#ifndef DTU_API_H
#define DTU_API_H

#include "baseTask.h"
#include "../device/dtuDevice.h"
#include "../tool/configManage.h"
#include "../include/tool/log.h"
#define SAND_RTCM_DATA_WAIT 0
#define SAND_RTCM_DATA_OK   -1
#define SAND_RTCM_DATA_ERROR -2
extern RTCM_Date g_rtcmData;
extern int32_t g_sandRtcmState; // 向外发送RTCM数据的状态值

#define GET_DTU_DATA_FLAG 1

#define DTU_RECV_WAIT 1
#define DTU_RECV_Done 2


int32_t getRTCMdata(uint8_t *buf, uint32_t bufLen);
void setRTCMdata(uint8_t *rtcmData, uint32_t rtcmLen);

class C_dtuApi : public C_baseTask
{
private:
    /* data */
    std::string task_name;
    int task_period;
    std::string task_topic;
    
    C_dtuDevice *p_dtuDevice;
    /* function */

public:
    C_dtuApi(/* args */);
    ~C_dtuApi();

///virtual int32_t initTask(CONFIG_DTU &config_dtu);
    int32_t initTask(CONFIG_DTU &config_dtu);
    void runLoopTask(void);
    int32_t getRTCMdata(uint8_t *buf, uint32_t bufLen);
};




#endif

